#include<android/log.h>
#include <jni.h>
#include <string>
#include "log.h"


extern "C" {
#include "libavutil/log.h"
#include "libavformat/avformat.h"
#include "libavutil/dict.h"
#include "libavcodec/avcodec.h"
#include "libavutil/timestamp.h"
}

static void log_packet(const AVFormatContext *fmt_ctx, const AVPacket *pkt, const char *tag) {
    AVRational *time_base = &fmt_ctx->streams[pkt->stream_index]->time_base;

    printf("%s: pts:%s pts_time:%s dts:%s dts_time:%s duration:%s duration_time:%s stream_index:%d\n",
           tag,
           av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, time_base),
           av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, time_base),
           av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, time_base),
           pkt->stream_index);
}


extern "C"
JNIEXPORT jint JNICALL
Java_com_example_helloffmpeg_system_FfmpegHelper_resampleAudio(JNIEnv *env, jobject thiz,
                                                               jstring dst_file_path) {

}
extern "C"
JNIEXPORT jint JNICALL
Java_com_example_helloffmpeg_system_FfmpegHelper_scaleVideo(JNIEnv *env, jobject thiz,
                                                            jstring dst_file_path) {

}